<template>
  <div id="home">
    <el-row class="block">

      <el-carousel height="500px">
        <el-carousel-item key="1">
          <img src="../../assets/img1.jpg" style="width:100%;" alt="">
        </el-carousel-item><el-carousel-item key="2">
          <img src="../../assets/img2.jpg" style="width:100%;" alt="">
        </el-carousel-item><el-carousel-item key="3">
          <img src="../../assets/img3.jpg" style="width:100%;" alt="">
        </el-carousel-item><el-carousel-item key="4">
          <img src="../../assets/img4.jpg" style="width:100%;" alt="">
        </el-carousel-item>
      </el-carousel>
    </el-row>

    <el-row class="buttons" type="flex" justify="center">
      <el-button type="primary" round @click="sign">Sign in</el-button>
      <el-button type="success" round @click="signup">Sign up</el-button>
    </el-row>
  </div>
</template>

<script>
  export default {
    name: "GDHome",
    components: {},
    methods: {
      sign() {
        this.$store.commit('setLoginMode','signin');
        this.bus.$emit('signIn')
      },
      signup(){
        this.$store.commit('setLoginMode','signup');
        this.bus.$emit('signIn')
      }
    }
  }
</script>

<style scoped>
  #home {
    position: absolute;
    left: 0px;
    top: 0;
    width: 100%;
    margin: 0;
    /*height:100%;*/

    background: #eeeeee;
  }

  .buttons {
    margin: 20px;
  }

  .el-button {
    width: 150px;
    margin: 20px;
  }

  .block {
    margin-top: 120px;
    text-align: center;
    width: 60%;
    left: 20%;
  }

  .el-carousel {
    border-radius: 3px;
  }

  .el-carousel__item h3 {
    color: #475669;
    font-size: 25px;
    opacity: 0.75;
    line-height: 500px;
    margin: 0;
  }

  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }

  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }
</style>
